﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RPGProject.LoopSystem
{
    /// <summary>
    /// An abstract class that loops.
    /// </summary>
    abstract class Loop
    {
        protected LoopManager loopManager;
        private int delay;
        /// <summary>
        /// Gets the delay for the loop.
        /// </summary>
        public int Delay
        {
            get { return this.delay; }
            set { this.delay = value; }
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="loopManager"></param>
        /// <param name="delay"></param>
        public Loop(LoopManager loopManager, int delay = 1)
        {
            this.loopManager = loopManager;
            this.delay = delay;
        }
        /// <summary>
        /// Run through the loop once.  Returns what to do with the loop.
        /// </summary>
        /// <returns></returns>
        abstract public FuncType RunOnce();
    }
}
